<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="text">
    <button class="btn">发送</button>
    <script>
        var btn = document.querySelector('button');
        btn.onclick = function () {
            var count = 5;
            btn.disabled=true;
            btn.innerText = count + 's';
            var timer = setInterval(function () {
                if(count === 1){
                    clearInterval();
                    btn.disabled = false;
                    btn.innertext = '提交';
                }else{
                    count--;
                    btn.innerText = count + 's'
                };
            }, 1000);
        }

    </script>
</body>

</html>